package net.oschina.app.fragment.explore;

import net.oschina.app.adapter.explore.MyEventAdapter;
import net.oschina.app.base.BaseListAdapter;
import net.oschina.app.base.BaseListFragment;
import net.oschina.app.bean2.EventBean;
import net.oschina.app.bean2.MoveMyBean;
import net.oschina.app.protocol.AccessProtocol;
import net.oschina.app.protocol.explore.MyEventProtocol;

import java.util.List;

/**
 * Created by 张运湘 on 2017/1/14.
 */

public class MyEventFragment extends BaseListFragment {

    @Override
    protected List parseData(Object body) {
        List<EventBean> eventBeanList = ((MoveMyBean) body).getEvents();
        return eventBeanList;
    }

    @Override
    protected AccessProtocol getProtocol() {
        MyEventProtocol myEventProtocol = new MyEventProtocol();
        return myEventProtocol;
    }

    @Override
    protected BaseListAdapter getAdapter() {
        MyEventAdapter myEventAdapter =  new MyEventAdapter(getActivity());
        return myEventAdapter;
    }
}
